<%--
  Created by IntelliJ IDEA.
  User: 甲乙饼叮叮
  Date: 2019/10/4
  Time: 15:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>个人中心</title>
    <link rel="Shortcut Icon" href="../imgs/Kat-icon.png">
    <!-- 引入bootstrap框架的样式文件 -->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.css" type="text/css">
    <link type="text/css" href="../css/personal.css" rel="stylesheet" />
    <link rel="stylesheet" href="../css/head.css">
    <link rel="stylesheet" href="../css/alert.css">
</head>

<body>
<!-- 导航开始 -->
<%@ include file="../nav/nav.jsp"%>
<!-- 导航结束 -->
    <!-- 个人中心视图 -->
    <a name="per"></a>
    <div class="personal1" style="height: 300px;">
        <div>
            <div class="leftlist">
                <h4>${orderVos.deptName}-${orderVos.sdeptName}&nbsp;(${orderVos.tstart}-${orderVos.tend})</h4><br>
                <span style="color: rgb(180, 180, 180)">知医治第一医院</span>
                <span style="padding-left: 300px; color: rgb(180, 180, 180)">医师:${orderVos.docName}</span>
            </div>
            <div class="rightlist">
                <span style="font-size: 2em;">${orderVos.month}/${orderVos.day}</span><br>
                <span style="color: rgb(180, 180, 180)">${orderVos.year}</span>
            </div>
        </div>
        <div style="clear: both;"></div>
        <hr>
        <div class="details">
            <span>就诊人:</span>
            <span>${userinfo.uname}</span><br>
            <span>身份证号:</span>
            <span>${userinfo.idcard}</span><br>
            <span>手机号:</span>
            <span>${orderVos.patientTel}</span><br>
        </div>
        <hr>
        <div class="details" style="float:left;">
            <span>挂号费用:</span>
            <span class="glyphicon glyphicon-yen" style="color: rgb(5, 160, 80)">${orderVos.regPrice}</span><br>
        </div>
        <div class="details" style="float:right;margin-right:50px;">
            <span><a href="${pageContext.request.contextPath}/personal/order"><button style="color:white;"><small>返回</small></button></a></span>&nbsp;&nbsp;
            <span><button class="alert-api-button alert-btn4" style="color:white;"><small>退号</small></button></span>&nbsp;&nbsp;
            <span><a href="${pageContext.request.contextPath}/personal/change?Oid=${orderVos.id}"><button style="color:white;"><small>修改科室</small></button></a></span>
        </div>
    </div>
<div style="height: 50px"></div>
    <!-- 弹出框 -->
<%@ include file="../nav/foot.jsp"%>
    <!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
    <script src="../plugins/jquery/jquery.min.js"></script>
    <!--引入bootstrap的js文件-->
    <script src="../plugins/bootstrap/js/bootstrap.js"></script>
    <!-- 引入alert的js文件 -->
    <script src='../js/alert.js'></script>
    <script>
        var M = {}
        // 按钮四
        $(document).delegate(".alert-btn4", 'click', function () {
            if (M.dialog4) {
                return M.dialog4.show();
            }
            M.dialog4 = jqueryAlert({
                'title': '知医治',
                'content': '确定取消挂号<br>三小时内将无法再次进行挂号',
                'modal': true,
                'animateType': '',
                'buttons': {
                    '返回': function () {
                        M.dialog4.close();
                    },
                    '确认': function () {
                        if (M.dialog41) {
                            return M.dialog41.show();
                        }
                        M.dialog41 = jqueryAlert({
                            'content': '退号成功'
                        })
                        function jump() {
                            $.ajax({
                                url:"http://localhost:8888/treatment/alipay/refund",
                                data:{Oid:${orderVos.id},amt:amt=${pay.amt},outTradeNo:${pay.outTradeNo}},
                                type:"GET",
                                success:function (result) {
                                    window.location.href='${pageContext.request.contextPath}/personal/user';
                                }
                            })
                            <%--window.location.href = '${pageContext.request.contextPath}/alipay/refund?Oid=${orderVos.id}&amt=${pay.amt}&outTradeNo=${pay.outTradeNo}';--%>
                        }
                        setTimeout(jump, 1500);


                    }
                }
            })
        })
    </script>
</body>

</html>
